//
//  HWZBMacros.h
//  HWZB
//
//  Created by 许成雄 on 2017/4/13.
//  Copyright © 2017年 wonders. All rights reserved.
//

#ifndef HWZBMacros_h
#define HWZBMacros_h

#define HWZBErrorDomain            @"com.hwzhibao.apps.ios.HWZB"
#define MSG_USER_NOT_LOGIN         @"用户未登录铧为至宝"
#define MSG_PARSE_DATA_FAILED      @"解析数据失败"
#define MSG_RESPONSE_DATA_IS_NULL  @"网络请求数据返回为空"
#define HWZB_ERROR_CODE            (-1)

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

//根据屏幕转化的对应值
#define TRANS_VALUE(x) ceil(SCREEN_WIDTH * x / 320)

#define IS_IOS_10  (floor([[UIDevice currentDevice].systemVersion floatValue]) >= 10.0f ? 1 : 0)

// rgb颜色转换（16进制->10进制）
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]

#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]


#define I_COLOR_YELLOW         UIColorFromRGB(0xf0821e)
#define I_COLOR_WHITE          RGBACOLOR(255, 255, 255, 1.0f)            //白色
#define I_COLOR_BLACK          RGBACOLOR(20, 20, 20, 1.0f)               //黑色
#define I_COLOR_BLUE           RGBACOLOR(20, 123, 238, 1.0f)             //蓝色
#define I_COLOR_RED            UIColorFromRGB(0xf23030)                  //红色
#define I_COLOR_GREEN          RGBACOLOR(27, 179, 116, 1.0f)             //绿色
#define I_COLOR_ORANGE         RGBACOLOR(252, 102, 34, 1.0f)             //橙色
#define I_COLOR_LIGHT_BLUE     RGBACOLOR(206, 229, 252, 1.0f)            //浅蓝色
#define I_COLOR_LIGHT_RED      RGBACOLOR(253, 220, 220, 1.0f)            //浅红色
#define I_COLOR_LIGHT_GREEN    RGBACOLOR(110, 192, 156, 0.5f)            //浅绿色
#define I_COLOR_LIGHT_WHITE    RGBACOLOR(255, 255, 255, 0.5f)            //浅白色

#define I_COLOR_33BLACK        UIColorFromRGB(0x333333)                  //浅黑色
#define I_COLOR_DARKGRAY       UIColorFromRGB(0x666666)                  //深灰色
#define I_COLOR_TABLE_HAEDER   UIColorFromRGB(0x999999)                  //表头颜色
#define I_COLOR_GRAY           RGBACOLOR(204, 204, 204, 1.0f)            //灰色
#define I_COLOR_BACKGROUND     RGBACOLOR(241, 241, 241, 1.0f)            //背景颜色
#define I_DIVIDER_COLOR        RGBACOLOR(231, 231, 231, 1.0f)            //分割条颜色
#define I_COLOR_TAB_IMAGE      UIColorFromRGB(0xf3f3f3)                  //黑色
#define I_COLOR_TAB_TEXT       UIColorFromRGB(0x666666)                  //黑色
#define I_COLOR_DIVIDER        RGBACOLOR(236, 236, 236, 1.0f)            //分割线颜色

#define TEXT_COLOR_BLACK       UIColorFromRGB(0xF8B62C)                  //黑色文字
#define TEXT_COLOR_GRAY        UIColorFromRGB(0xAEAEAE)                  //灰色文字
#define TEXT_COLOR_GREEN       UIColorFromRGB(0x12BE4F)                  //绿色文字
#define BACKGROUND_COLOR       UIColorFromRGB(0xFFFFFF)                  //页面背景颜色
#define DIVIDER_COLOR          UIColorFromRGB(0xCBCBCB)                  //分割线颜色
#define BORDER_COLOR           UIColorFromRGB(0xCBCBCB)                  //边框线颜色

//通知
#define kNotificationUserLogin               @"kNotificationUserLogin"
#define kNotificationUserInfoModify          @"kNotificationUserUserInfoModify"
#define kNotificationRefreshOrder            @"kNotificationRefreshOrder"
#define kNotificationAccountInfoChange       @"kNotificationAccountInfoChange"

#endif /* HWZBMacros_h */
